e895be0fd708e9cc7a3caf344d087dfa8d592949,Core/src/org/sleuthkit/autopsy/casemodule/ImageFilePanel.java,ImageFilePanel,isImagePathValid,#String#,307

Before Change


    private boolean isImagePathValid(String path){
        
        errorLabel.setVisible(false);
        String errorString = "";

        if (path.isEmpty()) {
            return false;   // no need for error message as the module sets path to "" at startup
        }
                
        // check if the is a WizardPathValidator service provider
        if (!pathValidatorList.isEmpty()) {
            // call WizardPathValidator service provider
            errorString = pathValidatorList.get(0).validateDataSourcePath(path, Case.getCurrentCase().getCaseType());
        } else {
            // validate locally            
            if (Case.getCurrentCase().getCaseType() == CaseType.MULTI_USER_CASE) {
                // check that path is not on "C:" drive
                if (pathOnCDrive(path)) {
                    errorString = NbBundle.getMessage(this.getClass(), "DataSourceOnCDriveError.text");  //NON-NLS
                } 
            } else {
                // single user case - no validation needed
            }
        }
        
        // set error string
        if (!errorString.isEmpty()){
            errorLabel.setVisible(true);
            errorLabel.setText(errorString);
            return false;
        }
        

After Change


     */
    private boolean isImagePathValid(String path){        
        errorLabel.setVisible(false);                
        if (!MultiUserPathValidator.isValid(path, Case.getCurrentCase().getCaseType())) {
            errorLabel.setVisible(true);
            errorLabel.setText(NbBundle.getMessage(this.getClass(), "DataSourceOnCDriveError.text"));
            return false;
        }
        return true;